
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>常见问题 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="39.html" />
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    [第一章 系统介绍]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="1.html">
            
                <a href="1.html">
            
                    
                    系统介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="2.html">
            
                <a href="2.html">
            
                    
                    功能特点
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    [第二章 快速上手]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="3.html">
            
                <a href="3.html">
            
                    
                    源码地址
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="4.html">
            
                <a href="4.html">
            
                    
                    服务部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="5.html">
            
                <a href="5.html">
            
                    
                    集成开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="6.html">
            
                <a href="6.html">
            
                    
                    源码测试
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    [第三章 架构分析]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="7.html">
            
                <a href="7.html">
            
                    
                    系统架构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="8.html">
            
                <a href="8.html">
            
                    
                    服务依赖关系
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="9.html">
            
                <a href="9.html">
            
                    
                    协议格式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="10.html">
            
                <a href="10.html">
            
                    
                    消息类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="11.html">
            
                <a href="11.html">
            
                    
                    系统配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="12.html">
            
                <a href="12.html">
            
                    
                    功能模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="13.html">
            
                <a href="13.html">
            
                    
                    SPI定制化
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    [第四章 深度进阶]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="14.html">
            
                <a href="14.html">
            
                    
                    秘钥交换
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="15.html">
            
                <a href="15.html">
            
                    
                    握手及快速重连
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="16.html">
            
                <a href="16.html">
            
                    
                    绑定用户
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="17.html">
            
                <a href="17.html">
            
                    
                    消息推送流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="18.html">
            
                <a href="18.html">
            
                    
                    HTTP代理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="19.html">
            
                <a href="19.html">
            
                    
                    消息分发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="20.html">
            
                <a href="20.html">
            
                    
                    消息序列化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="21.html">
            
                <a href="21.html">
            
                    
                    消息加密与压缩
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9" data-path="22.html">
            
                <a href="22.html">
            
                    
                    线程池配置与定制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.10" data-path="23.html">
            
                <a href="23.html">
            
                    
                    上行PUSH
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.11" data-path="24.html">
            
                <a href="24.html">
            
                    
                    广播推送与流控
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.12" data-path="25.html">
            
                <a href="25.html">
            
                    
                    广播推送条件过滤
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.13" data-path="26.html">
            
                <a href="26.html">
            
                    
                    消息ACK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.14" data-path="27.html">
            
                <a href="27.html">
            
                    
                    离线消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.15" data-path="28.html">
            
                <a href="28.html">
            
                    
                    服务端启动流程分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.16" data-path="29.html">
            
                <a href="29.html">
            
                    
                    日志模块性能优化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.17" data-path="30.html">
            
                <a href="30.html">
            
                    
                    JVM监控与性能分析
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                    [第五章 关联服务]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="31.html">
            
                <a href="31.html">
            
                    
                    Alloc服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="32.html">
            
                <a href="32.html">
            
                    
                    MPNS
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" >
            
                <span>
            
                    
                    [第六章 SDK接入]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="33.html">
            
                <a href="33.html">
            
                    
                    服务端SDK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="34.html">
            
                <a href="34.html">
            
                    
                    Android SDK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="35.html">
            
                <a href="35.html">
            
                    
                    MPushClient(Java)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="36.html">
            
                <a href="36.html">
            
                    
                    MPushClient(Swift)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="37.html">
            
                <a href="37.html">
            
                    
                    MPushClient(Obj-C)
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" >
            
                <span>
            
                    
                    [第七章 常见问题]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.8.1" data-path="38.html">
            
                <a href="38.html">
            
                    
                    常见问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="39.html">
            
                <a href="39.html">
            
                    
                    系统压测
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >常见问题</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h3 id="&#x5E38;&#x89C1;&#x95EE;&#x9898;">&#x5E38;&#x89C1;&#x95EE;&#x9898;</h3>
<p>1.&#x4FEE;&#x6539;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4E3A;&#x4EC0;&#x4E48;&#x4E0D;&#x751F;&#x6548;&#xFF1F;</p>
<p>  &#x5982;&#x679C;&#x662F;&#x6E90;&#x7801;&#x6D4B;&#x8BD5;&#xFF0C;&#x8BF7;&#x4FEE;&#x6539;<code>mpush-test</code>&#x6A21;&#x5757;<code>resources/application.conf</code>&#x6587;&#x4EF6;</p>
<p>  &#x5982;&#x679C;&#x662F;&#x72EC;&#x7ACB;&#x90E8;&#x7F72;&#xFF0C;&#x8BF7;&#x4FEE;&#x6539;<code>conf/mpush.conf</code>&#x6587;&#x4EF6;</p>
<p>  &#x8BF7;&#x4E0D;&#x8981;&#x4FEE;&#x6539;<code>reference.conf</code>&#x6587;&#x4EF6;&#xFF0C;&#x6B64;&#x6587;&#x4EF6;&#x53EA;&#x4F5C;&#x4E3A;&#x53C2;&#x8003;&#xFF0C;&#x5217;&#x51FA;&#x7CFB;&#x7EDF;&#x652F;&#x6301;&#x54EA;&#x4E9B;&#x914D;&#x7F6E;&#x9879;&#x53CA;&#x5176;&#x9ED8;&#x8BA4;&#x503C;&#x3002;</p>
<p>2.Alloc&#x8FD4;&#x56DE;&#x7684;&#x5916;&#x7F51;&#x5730;&#x5740;&#x4E0D;&#x5BF9;</p>
<p>  &#x8BF7;&#x5728;&#x4FEE;&#x6539;mpush server &#x91CC;&#x7684;<code>mpush.conf</code>&#x6216;<code>application.conf</code>&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x91CC;&#x7684;<code>mp.net.public-ip=</code>&#x914D;&#x7F6E;&#x9879;</p>
<p>  &#x683C;&#x5F0F;&#x67E5;&#x8003;<code>reference.conf</code>&#x5BF9;&#x5E94;&#x7684;&#x9ED8;&#x8BA4;&#x914D;&#x7F6E;&#xFF0C;alloc &#x91CC;&#x7684;&#x914D;&#x7F6E;&#x4E0D;&#x9700;&#x8981;&#x4FEE;&#x6539;</p>
<p>3.&#x600E;&#x4E48;&#x5F00;&#x542F;http proxy?</p>
<p>  &#x8BF7;&#x5728;<code>mpush.conf</code>&#x548C;<code>application.conf</code>&#x6DFB;&#x52A0;<code>mp.http.proxy-enabled=true</code></p>
<p>4.redis.clients.jedis.exceptions.JedisMovedDataException: MOVED 3456</p>
<p> &#x8BF7;&#x8BBE;&#x7F6E;redis&#x4E3A;&#x96C6;&#x7FA4;&#x6A21;&#x5F0F;<code>mp.redis.cluster-model=cluster</code></p>
<p>5.&#x5E7F;&#x64AD;&#x63A8;&#x9001;&#x6536;&#x4E0D;&#x5230;&#x63A8;&#x9001;&#x7684;&#x6D88;&#x606F;&#xFF0C;&#x6307;&#x5B9A;&#x7528;&#x6237;&#x53D1;&#x9001;&#x80FD;&#x6536;&#x5230;</p>
<p> &#x8BF7;&#x4FEE;&#x6539;&#x7F51;&#x5173;&#x6A21;&#x5F0F;&#x4E3A;<code>mp.net.gateway-server-net=tcp</code></p>
<p> &#x56E0;&#x4E3A;udp&#x7F51;&#x5173;&#x6A21;&#x5F0F;&#x4E0B;&#xFF0C;&#x5E7F;&#x64AD;&#x63A8;&#x9001;&#x4F7F;&#x7528;&#x7684;&#x662F;&#x7EC4;&#x64AD;&#xFF0C;&#x5982;&#x679C;&#x7F51;&#x7EDC;&#x914D;&#x7F6E;&#x4E0D;&#x6B63;&#x786E;&#xFF0C;&#x6BD4;&#x5982;&#x8DE8;&#x7F51;&#x6BB5;&#x7B49;&#x662F;&#x4E0D;&#x80FD;&#x6536;&#x5230;&#x6D88;&#x606F;&#x7684;&#x3002;</p>
<p>6.&#x5982;&#x4F55;&#x6839;&#x636E;&#x6E90;&#x7801;&#x6784;&#x5EFA;&#x5B89;&#x88C5;&#x5305;&#xFF1F;</p>
<p>  &#x6784;&#x5EFA;&#x547D;&#x4EE4;&#x4E3A; <code>mvn clean package -Pzip,pub</code> &#x5B89;&#x88C5;&#x5305;&#x8F93;&#x51FA;&#x8DEF;&#x5F84;&#x4E3A; <code>./mpush-boot/target/mpush-release-x.y.z.tar.gz</code>&#x3002;alloc&#x6784;&#x5EFA;&#x547D;&#x4EE4;&#x540C;&#x4E0A;&#x3002;</p>
<p>7.Alloc&#x6E90;&#x7801;&#x542F;&#x52A8;&#x62A5;&#x9519;</p>
<p>   alloc &#x542F;&#x52A8;&#x5165;&#x53E3;<code>com.shinemo.mpush.alloc.AllocServerMainTest.java</code></p>
<p>8.PushSender&#x63A8;&#x9001;&#x5EFA;&#x7ACB;&#x8FDE;&#x63A5;&#x8D85;&#x65F6;</p>
<p>   &#x9519;&#x8BEF;&#x5982;&#x4E0B;:<code>io.netty.channel.ConnectionTimeOutException:connection timed out: /xxx.xxx.xxx.xxx:3001</code></p>
<p>   &#x89E3;&#x51B3;&#x65B9;&#x5F0F;:</p>
<pre><code>   a.) &#x9996;&#x5148;&#x68C0;&#x67E5;ip&#x662F;&#x5426;&#x6B63;&#x786E; telnet xxx.xxx.xxx.xxx 3001&#x662F;&#x5426;&#x901A;

   b.) &#x5982;&#x679C;ip&#x4E0D;&#x6B63;&#x786E;&#x589E;&#x52A0;&#x914D;&#x7F6E;mp.net.local-ip=&quot;&#x6307;&#x5B9A;&#x5177;&#x4F53;&#x7684;ip&quot;
</code></pre><p>9.get gateway connection failure</p>
<p>  &#x5982;&#x679C;&#x4F7F;&#x7528;mpush-client&#x51FA;&#x73B0;&#x8FD9;&#x4E2A;&#x9519;&#x8BEF;&#x65E5;&#x5FD7;&#xFF0C;&#x5EFA;&#x8BAE;&#x68C0;&#x67E5;&#x4E0B;Guava&#x7684;&#x7248;&#x672C;&#x662F;&#x5426;&#x51B2;&#x7A81;&#x3002;</p>
<p>10.&#x5982;&#x4F55;&#x751F;&#x6210;RSA&#x5BC6;&#x94A5;&#x5BF9;</p>
<p>  1.) &#x5B89;&#x88C5;<code>openssl</code></p>
<p>  2.) &#x751F;&#x6210;&#x79C1;&#x94A5; <code>openssl genrsa -out rsa_private_key.pem 1024</code></p>
<p>  3.) &#x751F;&#x6210;&#x516C;&#x94A5; <code>openssl rsa -in rsa_private_key.pem -out rsa_public_key.pem -pubout</code></p>
<p>  4.) &#x4FEE;&#x6539;&#x79C1;&#x94A5;&#x683C;&#x5F0F; <code>openssl pkcs8 -topk8 -in rsa_private_key.pem -out rsa_private_key_pkcs8.pem -nocrypt</code></p>
<p>  5.) &#x5206;&#x522B;&#x590D;&#x5236;<code>rsa_public_key.pem</code>&#x548C;<code>rsa_private_key_pkcs8.pem</code>&#x4E2D;&#x7684;&#x5185;&#x5BB9;(&#x4E0D;&#x5305;&#x542B;-----&#x5F00;&#x59CB;&#x7684;&#x5934;&#x5C3E;&#x4E24;&#x884C;&#xFF0C;&#x5E76;&#x53BB;&#x9664;&#x5176;&#x4E2D;&#x7684;&#x6362;&#x884C;&#x7B26;&#xFF09;&#x5230;<code>mpush.conf</code>&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x91CC;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
                <a href="39.html" class="navigation navigation-next navigation-unique" aria-label="Next page: 系统压测">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"常见问题","level":"1.8.1","depth":2,"next":{"title":"系统压测","level":"1.8.2","depth":2,"path":"39.md","ref":"39.md","articles":[]},"previous":{"title":"[第七章 常见问题]","level":"1.8","depth":1,"ref":"","articles":[{"title":"常见问题","level":"1.8.1","depth":2,"path":"38.md","ref":"38.md","articles":[]},{"title":"系统压测","level":"1.8.2","depth":2,"path":"39.md","ref":"39.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"38.md","mtime":"2023-05-21T17:09:55.143Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2023-06-26T16:20:41.295Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

